<#if keywords??>
	<div class="in">
		<h2>${keywords} - 搜索结果</h2>
	</div>
	<div class="line"></div>
</#if>
<div class="in">			
	<#if list?has_content>
		<table border="0" cellspacing="0" cellpadding="10" class="table_main"><tbody>
		  <tr style="background-color:#d9d8d8; font-size:14px; padding: 14px;">
			<td width="50%" style="padding: 14px;"><strong>标题</strong></td>
			<td width="20%" style="padding: 14px;"><strong>分类目录</strong></td>
			<td width="20%" style="padding: 14px;"><strong>标签</strong></td>
			<td width="10%" style="padding: 14px;"><strong>日期</strong></td>
		  </tr>
		  <#list list as post>
			  <tr class="<#if post_index%2==0>gray</#if>">
				<td>
					<strong>
						<#if post.top==1>
							[置顶]
						</#if>
						<a href="/admin/post?oper=edit&id=${post.id}" title="编辑 - ${post.title}">${post.title}</a>
					</strong>
					<div class="actions_wrapper">
						<div class="actions" style="display: none;">
							<a 
								href="/admin/post?oper=edit&id=${post.id}" 
								title="编辑 - ${post.title}">
								编辑
							</a> |
							<a 
								href="/post?id=${post.id}" 
								title="查看 - ${post.title}">
								查看
							</a> |
							<a 
								href="/admin/post?oper=<#if (1==post.top)>no</#if>top&id=${post.id}" 
								title="<#if (1==post.top)>取消</#if>置顶 - ${post.title}">
								<#if (1==post.top)>取消</#if>置顶
							</a> |
							<a 
								href="/admin/comment?postId=${post.id}" 
								title="评论 - ${post.title}">
								评论
							</a> |
							<a 
								href="/admin/post?oper=delete&id=${post.id}" 
								title="删除 - ${post.title}">
								删除
							</a> 
						</div>
					</div>
				</td>
				<td><#list post.cats! as cat><#if (cat_index>0)>, </#if>${cat.name}</#list></td>
				<td><#list post.tags! as tag><#if (tag_index>0)>, </#if>${tag.name}</#list></td>
				<td>
					${post.postTime}
					<div class="actions_wrapper">
						${status[post.status]}
					</div>
				</td>
			  </tr>
		  </#list>
		</tbody></table>
	<#else>
  		<h2>还没有文章哦! <a href="/admin/post">写一写</a></h2>
  	</#if>
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
	$("tr").mouseover(function(){
		$(this).find(".actions").show();
	}).mouseout(function(){
		$(this).find(".actions").hide();
	});
</script>